﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Default" Codebehind="Default.aspx.cs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<!-- Copyright 2010 - Ian Quigley -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> 
<head> 
	<title>Twipler - An Open Source Twitter Web Client</title>
	<meta name="description" content="Twipler is a Twitter Web Client, suitable for Mobile and Desktop environments. It is Open Source and developed in C#" />
	<meta name="keywords" content="Twitter, Twitter Web Client, WebClient, Mobile, Desktop, Open Source" />

	<link rel="Stylesheet" href="Default-screen.css" media="screen" />
	<link rel="Stylesheet" href="Default-handheld.css" media="handheld" />


    <script language="javascript" type="text/javascript">
    
    function VerifyAgree(ctrlName) {
        var ctrl = document.getElementById(ctrlName);
        if (ctrl.checked == false) {
            alert('Please agree to the terms and conditions before logging in');
            ctrl.focus();
            return false;
        }
        return true;
    }

    function VerifyFields(txtName, pwdName) {
    
        var ctrl;

        ctrl = document.getElementById(txtName);
        if (trim(ctrl.value).length == 0) {
            alert('Enter your username');
            ctrl.focus();
            return false;
        }

        ctrl = document.getElementById(pwdName);
        if (trim(ctrl.value).length == 0) {
            alert('Enter your username');
            ctrl.focus();
            return false;
        }

        return true;
       }
      
    
    function setFollowCookie(ctrl) {
		createCookie("follow", ctrl.checked, 100);
       }

	// Copied from quirksmode.com
	function createCookie(name,value,days) {
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
	}

	// Copied from quirksmode.com
	function readCookie(name) {
       	var nameEQ = name + "=";
       	var ca = document.cookie.split(';');
       	for (var i = 0; i < ca.length; i++) {
       		var c = ca[i];
       		while (c.charAt(0) == ' ') c = c.substring(1, c.length);
       		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
       	}
       	return null;
       }

    
    function trim(str) {
        return str.replace(/^\s*/, "").replace(/\s*$/, "");
    }

	  var pos = 0;

	  function OnLoadStuff() {

		// A Small Screen Size is 640x480 resolution or smaller.
		var isSmallScreen = ((screen.width * screen.width) + (screen.height * screen.height)) <= ((640*640)+(480*480));
		if (!isSmallScreen) {
			setTimeout('animation();', 100);
		}
	  }
	 
	 function animation(){
		pos = pos + 1;
		if (pos > 563) pos = 0;

		document.getElementById('scroller').style.backgroundPosition = '' + pos + 'px 0px';
		setTimeout('animation();', 25);
	 }	 
    
    </script>
    <asp:Literal ID="litHeader" runat="server" />
</head>

<body onload="OnLoadStuff()">
<form id="mainForm" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>		

    <asp:Panel id="pnlNotLoggedIn" runat="server" Visible="false">

	<div class="header">
		<div style="height:0px; font-size:0px;">&nbsp;</div>
		<div id="scroller" class="hide " style="background-position: 0px 10px;" >&nbsp;</div>

		<div class="inner">
			<div class="title"><img src="http://app.twipler.com/images/twipler-vsmall.png" /></div>
			<div class="logo"><img src="http://app.twipler.com/images/twipler-small.png" /></div>
			
			<div class="right">
				<span>Agree to <a href="#" class="terms">terms and conditions</a> </span><asp:CheckBox ID="chkAgree" runat="server" CssClass="chk" /><br/>
				<span>Follow @twipler (1 tweet a week)</span><asp:CheckBox ID="chkFollow" runat="server" CssClass="chk" /><br />
			</div>
			<div class="login">
			    <asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate><asp:Literal ID="litPage" runat="server" Text="<span class=connecting>Connecting...</span>" /></ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="timerTickNow" /></Triggers></asp:UpdatePanel>
			</div>
		</div>

		<div class="inner" id="login_options"  >			
			<b>Twipler login</b>&nbsp;&nbsp;
			<span>Screenname <asp:TextBox ID="txtTwipScreenname" runat="server" style="border:1px solid #ccc" /></span>
			<span>Password <asp:TextBox ID="txtTwipPassword" runat="server" style="border:1px solid #ccc" TextMode="Password" /></span>
			<asp:LinkButton ID="btnTwipLogin" CssClass="loginsmall" runat="server" Text="Login" OnClick="btnTwipLogin_Click" />

			<a href="http://blog.twipler.com/A39_Twipler_Login.html" target="_blank" style="display:block; float:right; margin-left: 5px;"><img src="images/Info2.png" border="0" /> </a>
		</div>
	
	</div>

	<div class="page ">
		<div class="wrap">
			<div class="inner">
				<div class="float blue">
					<h3>Why?</h3>
					<p>The primary goals of Twipler are</p>
					<ul>
						<li>Looks - Allow total customization of the layout (HTML/CSS)</li>
						<li>Functionality - Open Source, so anyone can add to it</li>
					</ul>
					<br/>
					<h3>How?</h3>
					<p><b>CSS</b> - do you know your CSS?<br/> When you login select "designs" then "stylable basic" then select "new design based on..." and select a CSS design from the list.</p>
					<p><b>HTML</b> - getting tricky<br/>Editing HTML is currently restricted. Make a request @IanQuigley for access.</p>
					<p><b>C#</b> - hardcore!<br/>The source is over at <a href="http://twipler.googlecode.com">twipler.googlecode.com</a>. If you want to go further, get in contact.</p>
				</div>			

				<div class="float blue">
					<h3>Contribute</h3>
					<p>You want to help, but you don't want to commit. I get that.</p>
					<p>Give me some <a href="http://twipler.uservoice.com" target="_blank" class="feedback">feedback</a> by voting and request features.</p>
					<p>If you want to get involved, or just want to talk about twipler tweet me @IanQuigley</p>
				</div>
							
				<div class="float green">
					<h3>Old login</h3>
					<p>If you are looking for the old login, click "show login options" above. Note that this will not work after 16th August.</p>
				</div>
			
				<div class="float grey">
					<h3>Adverts</h3>
					<p>Twipler is supported by love, not adverts.</p>
				</div>
			
				<div style="height:0px; font-size:0px; clear:both;">&nbsp;</div>
			</div>
		</div>
	</div>		

	<div class="footer ">
		<a href="http://blog.twipler.com/A37_Terms_of_Service.html">terms &amp; conditions</a><span>-</span><a href="http://blog.twipler.com/A22_FAQ.html">FAQ</a><span>-</span><a href="http://blog.twipler.com">blog</a>
	</div>

	
    <asp:Timer ID="timerTickNow" runat="server" Enabled="true" Interval="50" OnTick="timerTickNow_Update" />
    
    <!-- Basic authentication will be suspended by Twitter 30 June 2010 -->
    
           
    </asp:Panel>
</form>
</body>
</html>